package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_pms_y_ytyp database table.
 * 
 */
@Entity
@Table(name="per_pms_y_ytyp")
@NamedQuery(name="PerPmsYYtyp.findAll", query="SELECT p FROM PerPmsYYtyp p")
public class PerPmsYYtyp implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int ytypid;

	private String ytyplx;

	//bi-directional many-to-one association to PerPmsYBun
	@OneToMany(mappedBy="perPmsYYtyp")
	private List<PerPmsYBun> perPmsYBuns;

	public PerPmsYYtyp() {
	}

	public int getYtypid() {
		return this.ytypid;
	}

	public void setYtypid(int ytypid) {
		this.ytypid = ytypid;
	}

	public String getYtyplx() {
		return this.ytyplx;
	}

	public void setYtyplx(String ytyplx) {
		this.ytyplx = ytyplx;
	}

	public List<PerPmsYBun> getPerPmsYBuns() {
		return this.perPmsYBuns;
	}

	public void setPerPmsYBuns(List<PerPmsYBun> perPmsYBuns) {
		this.perPmsYBuns = perPmsYBuns;
	}

	public PerPmsYBun addPerPmsYBun(PerPmsYBun perPmsYBun) {
		getPerPmsYBuns().add(perPmsYBun);
		perPmsYBun.setPerPmsYYtyp(this);

		return perPmsYBun;
	}

	public PerPmsYBun removePerPmsYBun(PerPmsYBun perPmsYBun) {
		getPerPmsYBuns().remove(perPmsYBun);
		perPmsYBun.setPerPmsYYtyp(null);

		return perPmsYBun;
	}

}